package _14并发工具类_CountDownLatch;


import java.util.concurrent.CountDownLatch;

public class Mother extends Thread{

    private CountDownLatch latch;

    public Mother(CountDownLatch latch) {
        this.latch = latch;
    }

    @Override
    public void run() {
        System.out.println("妈妈包饺子");
        try {
            latch.await();

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("孩子吃完饺子了，妈妈开始收碗");
    }
}
